[spectec] Make definition of state access nicer#2036
Conversation
|
@f52985, I just noticed that this older PR is still awaiting your attention as well. :) |
|
Oops, I didn’t even realize this PR existed. 😅 The issue is that the new functions This happens because of an assumption in the translator based on the specification: Whenever a function returns In this pattern, each function call is isolated, and the return value of each call is bound to a single variable. Based on this assumption, the IL2AL translator removes explicit store passing and uses the variable However, the new functions Because of this, I believe these functions require special handling at some point—either through a My choice was to add a hardcoded case in the interpreter that treats |
@f52985, in an attempt to make (the rendering of) these helpers a bit more readable, I introduced a trivial indirection through two auxiliary functions. Unfortunately, that completely breaks the interpreter, and I don't understand why. Can you please have a look?